<template>
  <view>
    <nut-navbar title="AI 超分辨率" @click-title=""></nut-navbar>
    <nut-uploader :url="uploadUrl" maximum="5" :auto-upload="false" ref="uploadRef" :data="fd"></nut-uploader>
    <br />
    <nut-button type="success" size="small" @click="submitUpload">手动执行上传</nut-button>
    <nut-button type="success" size="small" @click="clearUpload">手动清空上传</nut-button>
  </view>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
const val = ref('')
const uploadUrl = '/ai/sr-img'
const uploadRef = ref(null)
const fd = ref({
  "taskName": "ESRGAN"
})

const submitUpload = () => {
  // fd.value.append("taskName", "RealESRGAN")
  uploadRef.value?.submit()
}
const clearUpload = () => {
  uploadRef.value?.clearUploadQueue()
}
</script>